package com.enzoism.springboot.dive.bis.pool;

import java.util.Timer;
import java.util.TimerTask;

public class JavaTimerTest {
    /**
     * 使用Timer创建定时器s
     * @param args
     */
    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new MyTimerTask(),200,1000);
    }

    static class MyTimerTask extends TimerTask {
        @Override
        public void run() {
            System.out.println("------>定时任务调度");
        }
    }
}
